package com.wxx.template;

/**
 * @author Jetwang
 * @version 1.0
 * @date 2022/5/24 19:22
 */
public abstract class Course {
    protected final void makeCourse() {
        makePPT();
        makeVideo();
        if (needWriteArticle()) {
            makeArticle();
        }
        packageCourse();
    }

    final void makePPT() {
        System.out.println("制作PPT...");
    }

    final void makeVideo() {
        System.out.println("制作视频...");
    }

    final void makeArticle() {
        System.out.println("制作文章...");
    }

    protected boolean needWriteArticle() {
        return false;
    }

    abstract void packageCourse();
}
